<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body></body>
</html>
<script>
  function getfoods(number) {
    var sum = 0;
    for (var k = 1; k <= number; k++) {
      var num = 1;
      for (var i = 1; i < number; i++) {
        num = num * 2; //按照规律，每次乘以2；
      }
      sum = sum + num; //每次都把之前的sum进行相加；
    }
    //   console.log(sum * 0.00001);
    return sum * 0.00001;
  }
  var flag=getfoods(64)
  console.log(flag)
</script>
